package x.ovo.wechat.bot.common;

import lombok.Getter;
import lombok.Setter;
import x.ovo.wechat.bot.common.command.CommandManager;
import x.ovo.wechat.bot.common.contact.ContactManager;
import x.ovo.wechat.bot.common.event.EventManager;
import x.ovo.wechat.bot.common.http.HttpEngine;
import x.ovo.wechat.bot.common.http.WechatApi;
import x.ovo.wechat.bot.common.http.session.LoginSession;
import x.ovo.wechat.bot.common.plugin.PluginManager;

/**
 * 上下文
 *
 * @author ovo, created by 2024/05/01
 */
@Getter@Setter
//@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class Context {

    private volatile boolean running = false;
    private volatile boolean login = false;
    private volatile boolean autoLogedin = false;
    private long lastSyncCheckTime = 0;

    private WechatApi api;
    private HttpEngine<?> httpEngine;
    private LoginSession loginSession;
    private PluginManager pluginManager;
    private EventManager eventManager;
    private CommandManager commandManager;
    private ContactManager contactManager;


    public static Context create() {
        return new Context();
    }
}
